<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="../included/commons.jsp"%>
<link href="${base}pratices/scripts/ajax-file-uploader/client/fileuploader.css" rel="stylesheet" type="text/css" />	
<fieldset>
  <legend>上传图片文件</legend> 
  <div id="file-upload-jpg"></div>
  </fieldset>
<div id='output1'></div>

<script type="text/javascript" src="${base}pratices/scripts/ajax-file-uploader/client/fileuploader.js"></script>
<script type="text/javascript">
   	$(function(){
   		  function createUploader(){            
           var jpguploder = new qq.FileUploader({
                element: document.getElementById('file-upload-jpg'),
                action: '/stat/addprocess.action',
                fileDataName:"imageFile",
                allowedExtensions: ['xml','txt'],  
                debug: true,
                onComplete: function(id, fileName, resp){
                	$("#output1").append("文件 :"+fileName+"上传完毕!<br/>");
                	$("#output1").append(fileName);  
                }
                
            });       
                 
        }
   		  
     createUploader(); 
   	 tbar.removeAll(true);
   	 tbar.addButton([{text:'返回流程列表',handler:function(){
         doAjaxLink('${base}listprocesses.action');
 	 }}        
 	 ]);
      tbar.render(); 
   	 });
</script>